import React from 'React'
import {View} from '@tarojs/components'
import './BgImage.scss'

interface Props {
  url: string,
  paddingTop?: string
}

const BgImage: React.FC<Props> = React.memo((props) => {
  const {url, paddingTop = '66%'} = props

  return <View className='bg_image' style={{backgroundImage: `url(${url})`, paddingTop: paddingTop}} />
})

export default BgImage
